home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / pgm_tool / lu62 / lrfhand.c < prev    next >
C/C++ Source or Header  |  1995-07-03  |  3KB  |  102 lines

  1. /*
  2.   Local resource failure handler.
  3.  
  4.   Function: This procedure make notifying of a conversation partner
  5.             about the failure of the local resources.
  6.  
  7.  CopyRight 1995. Nicholas Poljakov all rights reserved.
  8.  
  9.  */
  10.  
  11. #include <lucb.h>
  12. #include <rcb.h>
  13. #include <scb.h>
  14. #include <include.h>
  15. #include <state1.h>
  16.  
  17. extern struct rcb *wait_rcb;
  18. extern struct lucb lu6;
  19. int sk_r_wt(void *);
  20. int SendBlock(void *, void *);
  21. int setrc(void *, void *);
  22. int sendhsf(void *);
  23. int sendhs(void *);
  24. int sendbm(void *, void *);
  25. int sendat(void *);
  26. int rtsend(void *);
  27. unsigned long rmfmh5(void *, void *);
  28. int recwait(void *);
  29. int rcvru(void *, void *);
  30. int rcvhs(void *, void *, void *, void *);
  31. int ralloc(void *, void *);
  32. int psrm(int, void *, void *);
  33. int ps_conv(int, void *);
  34. int proterr(void *, unsigned long);
  35. int preptrcv(void *, void *);
  36. int post_rcb(void *);
  37. struct repass *postopen(void *);
  38. int phsrec(void *);
  39. int pfmh5(void *);
  40. int opndst(void *);
  41. int obtsess(void *, unsigned char);
  42. int get_sess(void *, void *);
  43. int get_attr(void *);
  44. int fsm_error(unsigned char, void *);
  45. int fsm_conv(unsigned char, unsigned char, void *);
  46. int flush (void *);
  47. int dcp(void *);
  48. int dealloc(void *);
  49. int crtp(void *);
  50. int conv(void *);
  51. int chkparm(void *, void *);
  52. int check_end(unsigned int, void *);
  53. struct rqb *call_appl(void *);
  54. int buffmng(unsigned char, void *, void *, void *, unsigned, unsigned char, unsigned);
  55. unsigned long attltck(void *);
  56. unsigned long attacheck(void *);
  57. char *cgetmem(int, int);
  58. int sendhsf(void *);
  59. int opndst(void *);
  60. int alloc_rcb(void *, void *);
  61. int allocate(void *);
  62. int clsdst(void *);
  63. int bldfmh7(void *, unsigned long);
  64.  
  65. Lrf_handler(s_ptr)
  66. struct rqb *s_ptr;
  67. {
  68.      struct scb *p_scb;
  69.      struct rcb *p_rcb;
  70.      register int i;
  71.      unsigned long sense;
  72.      unsigned char p1;
  73.  
  74.     /*
  75.      * Search for the SCB
  76.      */
  77.     p_scb = lu6.scb_list;
  78.     while (p_scb != NULL) {
  79.         for (i = 0; i < 8; i++) {
  80.             if (s_ptr -> th.ra.wa.area[i] != p_scb -> lu_name[i]) {
  81.                 goto N_scb;
  82.             }
  83.         }
  84.         break;
  85.         N_scb:
  86.                p_scb = p_scb -> next;
  87.     }
  88.     if (p_scb == NULL) {
  89.         return; /* the SCB was not found */
  90.     }
  91.  
  92.     p_rcb = p_scb -> p_rcb;
  93.     wait_rcb = p_rcb;
  94. #if OS_TYPE == 0 /* MS-DOS */
  95.     post_rcb(p_rcb);
  96. #endif
  97.     p1 = ALLOC_FAIL_RETRY;
  98.     fsm_error(p1, p_rcb);
  99.     sense = 0x000107ff;  /* user sense code - local_resource_failure */
  100.     bldfmh7(p_rcb, sense);
  101. }
  102.